#!/usr/bin/env bash

# 创建 migrations
mkdir -p /usr/local/docker/mysite/data/migrations/user
touch /usr/local/docker/mysite/data/migrations/user/__init__.py

mkdir -p /usr/local/docker/mysite/data/migrations/verification
touch /usr/local/docker/mysite/data/migrations/verification/__init__.py

mkdir -p /usr/local/docker/mysite/data/migrations/article
touch /usr/local/docker/mysite/data/migrations/article/__init__.py

mkdir -p /usr/local/docker/mysite/data/migrations/webinfo
touch /usr/local/docker/mysite/data/migrations/webinfo/__init__.py

mkdir -p /usr/local/docker/mysite/data/migrations/search
touch /usr/local/docker/mysite/data/migrations/search/__init__.py

mkdir -p /usr/local/docker/mysite/data/migrations/message
touch /usr/local/docker/mysite/data/migrations/message/__init__.py

# 安装、运行
docker-compose up -d --build
cp ./mysite.conf  /usr/local/docker/nginx/conf/mysite.conf
cp -r ./dist /usr/local/docker/mysite/data/
docker restart nginx
